package org.wigiri.qa;

import java.util.logging.Level;
import java.util.logging.Logger;

import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Text;
import org.openqa.selenium.example.*;


public class TestUI extends ApplicationWindow{
	public TestUI() {
		super(null);
		Logger logger = Logger.getLogger ("");
    	//logger.setLevel(Level.SEVERE);
    	//logger.setLevel(Level.OFF);
	}
	
	@Override
	protected Control createContents(Composite parent) {
		getShell().setText("window");
		
		HtmlUnitExample ex = new HtmlUnitExample();
		String result = "";
		try {
			result = ex.getResult();
		} catch (Exception e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		
		Text tx_welcome = new Text(parent, SWT.CENTER);
		tx_welcome.setText(result);
		
		//parent.setSize(800,600);
		return parent;
	}

	public static void main(String[] args) {
		TestUI tu = new TestUI();
		tu.setBlockOnOpen(true);
		tu.open();
		Display.getCurrent().dispose();

	}

}
